package com.cg.client;

import com.cg.dto.*;
import com.cg.vo.*;
import com.cg.vo.floor.FloorItemsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "item-provider")
public interface ItemClient {


    //获取所有的商品分类
    @PostMapping("/p/index/queryAllType")
    public Dto<List<ItemInfoVo>> findItemAll();


    //获取首页横向导航数据
    @PostMapping("/p/index/queryTransverse")
    public Dto<List<TransverseVo>> queryTransverse();


    //首页轮播图接口
    @PostMapping("/p/index/queryBanner")
    public Dto<List<HotItems>> queryBanner();



    //今日推荐列表
    @PostMapping("/p/index/queryTodayRecommend")
    public Dto<List<BannerVo>> queryTodayRecommend();


    //即将开售列表
    @PostMapping("/p/index/queryToSaleItem")
    public Dto<List<BannerVo>> queryToSaleItem();


    //首页返回不同楼层展示数据
    @PostMapping("/p/index/queryFloorItems")
    public Dto<List<FloorItemsVo>> queryFloorItems();
    //不同分类排行
    @PostMapping("/p/index/queryHotItems")
    public Dto<List<HotsVo>> queryHotitems(@RequestBody HotDto hotDto);


    //1. 根据分类查询轮播图
    @PostMapping("/p/index/querySlideShowPic")
    public Dto<List<HotItems>> querySlideShowPic(HotDto hotDto);


    //根据商品ID返回商品详情页
    @PostMapping("/p/index/queryItemDetail")
    public Dto<ItemDetailVo> queryItemDetail(@RequestBody ItemDetailDto itemDetailDto);


    //根据商品id查询商品排期
    @PostMapping("/p/index/queryItemScheduler")
    public Dto<List<ItemSchedulerVo>> queryItemScheduler(@RequestBody ItemSchedulerDto itemSchedulerDto);


    //根据商品排期查询商品价格
    @PostMapping("/p/index/queryItemPrice")
    public Dto<List<ItemPriceVo>> queryItemPrice(@RequestBody ItemPriceDto itemPriceDto);


    //根据商品id查询剧评
    @PostMapping("/p/index/queryItemComment")
    public Dto<List<ItemCommentVo>> queryItemComment(@RequestBody ItemCommentDto itemCommentDto);


    //添加评论
    @PostMapping("/p/index/commitItemComment")
    public Dto addItemComment(@RequestBody AddItemCommentDto addItemCommentDto);


    //推荐接口
    @PostMapping("/p/index/queryItemRecommend")
    public Dto<List<ItemRecommendVo>> queryItemRecommend(@RequestBody ItemRecommendDto itemRecommendDto);


    //查询分类接口
    @PostMapping("/p/index/queryItemType")
    public Dto<List<QueryItemTypeVo>> queryItemType(@RequestParam("parent") Long parent);


    //猜你喜欢接口
    @PostMapping("/p/index/queryItemLike")
    public Dto<List<QueryItemLikeVo>> queryItemLike(@RequestParam("itemTypeId") Long itemTypeId);


    @PostMapping("/p/index/queryItemByMonth")
    public Dto<List<DayItemVo>> queryItemByMonth(@RequestBody DayItemDto dto);
}
